/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

/**
 *
 * @author Tiago
 */
public class DiagnosticoPrescricaoView extends javax.swing.JDialog {
    //variável para diferenciar alteração de inclusão. Inclusão = False, Alteração = True
    boolean alterar;
    int codigo;
    
    public DiagnosticoPrescricaoView(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo( null );
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnDiagnosticoPrescricaoCampo = new javax.swing.JPanel();
        tfDiagnosticoPrescricaoFuncionario = new javax.swing.JTextField();
        btDiagnosticoPrescricaoFuncionario = new javax.swing.JButton();
        tfDiagnosticoPrescricaoUsuario = new javax.swing.JTextField();
        btDiagnosticoPrescricaoUsuario = new javax.swing.JButton();
        lbDiagnosticoPrescricaoFuncionario = new javax.swing.JLabel();
        lbDiagnosticoPrescricaoUsuario = new javax.swing.JLabel();
        pnDiagnosticoPrescricaoBotao = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        btDiagnosticoPrescricaoFuncionario.setIcon(new javax.swing.ImageIcon("D:\\Fatec\\Laboratório de Engenharia de Software\\Ícones\\lupa_zoom.png")); // NOI18N

        btDiagnosticoPrescricaoUsuario.setIcon(new javax.swing.ImageIcon("D:\\Fatec\\Laboratório de Engenharia de Software\\Ícones\\lupa_zoom.png")); // NOI18N

        lbDiagnosticoPrescricaoFuncionario.setText("Funcionário:");

        lbDiagnosticoPrescricaoUsuario.setText("Usuário:");

        javax.swing.GroupLayout pnDiagnosticoPrescricaoCampoLayout = new javax.swing.GroupLayout(pnDiagnosticoPrescricaoCampo);
        pnDiagnosticoPrescricaoCampo.setLayout(pnDiagnosticoPrescricaoCampoLayout);
        pnDiagnosticoPrescricaoCampoLayout.setHorizontalGroup(
            pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDiagnosticoPrescricaoCampoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbDiagnosticoPrescricaoFuncionario, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
                    .addGroup(pnDiagnosticoPrescricaoCampoLayout.createSequentialGroup()
                        .addComponent(lbDiagnosticoPrescricaoUsuario)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(tfDiagnosticoPrescricaoUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)
                    .addComponent(tfDiagnosticoPrescricaoFuncionario))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btDiagnosticoPrescricaoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btDiagnosticoPrescricaoUsuario, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        pnDiagnosticoPrescricaoCampoLayout.setVerticalGroup(
            pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnDiagnosticoPrescricaoCampoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btDiagnosticoPrescricaoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfDiagnosticoPrescricaoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lbDiagnosticoPrescricaoFuncionario)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnDiagnosticoPrescricaoCampoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(tfDiagnosticoPrescricaoUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lbDiagnosticoPrescricaoUsuario))
                    .addComponent(btDiagnosticoPrescricaoUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(112, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnDiagnosticoPrescricaoBotaoLayout = new javax.swing.GroupLayout(pnDiagnosticoPrescricaoBotao);
        pnDiagnosticoPrescricaoBotao.setLayout(pnDiagnosticoPrescricaoBotaoLayout);
        pnDiagnosticoPrescricaoBotaoLayout.setHorizontalGroup(
            pnDiagnosticoPrescricaoBotaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        pnDiagnosticoPrescricaoBotaoLayout.setVerticalGroup(
            pnDiagnosticoPrescricaoBotaoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnDiagnosticoPrescricaoBotao, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnDiagnosticoPrescricaoCampo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnDiagnosticoPrescricaoCampo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnDiagnosticoPrescricaoBotao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(DiagnosticoPrescricaoView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(DiagnosticoPrescricaoView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(DiagnosticoPrescricaoView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(DiagnosticoPrescricaoView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                DiagnosticoPrescricaoView dialog = new DiagnosticoPrescricaoView(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btDiagnosticoPrescricaoFuncionario;
    private javax.swing.JButton btDiagnosticoPrescricaoUsuario;
    private javax.swing.JLabel lbDiagnosticoPrescricaoFuncionario;
    private javax.swing.JLabel lbDiagnosticoPrescricaoUsuario;
    private javax.swing.JPanel pnDiagnosticoPrescricaoBotao;
    private javax.swing.JPanel pnDiagnosticoPrescricaoCampo;
    private javax.swing.JTextField tfDiagnosticoPrescricaoFuncionario;
    private javax.swing.JTextField tfDiagnosticoPrescricaoUsuario;
    // End of variables declaration//GEN-END:variables
}
